/**
 * 
 */
package com.yst.metho.web.application.projectversion;

import nextapp.echo2.app.event.ActionEvent;

import com.yst.metho.web.application.SuiviProdApp;
import com.yst.metho.web.application.interfaces.IItemViewWeb;
import com.yst.suivi.data.project.Project;
import com.yst.suivi.data.rights.Right;

/**
 * @author perso
 * 
 */
public class ProjectDetailsView extends IItemViewWeb
{
	private Project mProject;

	/**
	 * @param project
	 */
	public ProjectDetailsView(Project project)
	{
		super(Right.VIEW_ADMIN_PROJECT_VERSION);
		mProject = project;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
	 */
	public void actionPerformed(ActionEvent e)
	{
		ProjectDetailPane projectViewPane = new ProjectDetailPane(mProject);
		SuiviProdApp.getApp().changeWorkingArea(projectViewPane);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yst.metho.web.application.interfaces.IItemViewWeb#getCategory()
	 */
	public String getCategory()
	{
		return "Mes Projets";
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.yst.metho.web.application.interfaces.IItemViewWeb#getName()
	 */
	public String getName()
	{
		return mProject.getNom();
	}
}
